#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <UIKit/UITableCell.h>
#import <UIKit/UIImageAndTextTableCell.h>
#import <UIKit/UIImage.h>
#import <UIKit/UITextView.h>
#import <UIKit/UISwitchControl.h>
#import <UIKit/UITransitionView.h>
#import <UIKit/UIWindow.h>
#import <UIKit/UIView.h>
#import <UIKit/UIAlertSheet.h>

#import "ViewController.h"

extern UIApplication *UIApp;

static id sharedInstanceViewControl;

@implementation ViewController 

-(id) initWithFrame:(CGRect) aframe
{
	if ((self == [super initWithFrame: aframe]) != nil) 
	{
		frame = CGRectMake(aframe.origin.x, aframe.origin.y,
					aframe.size.width, aframe.size.height);
		transition = [[UITransitionView alloc] initWithFrame:aframe];
		[self addSubview: transition];
	}
	return self;
}

-(void) transitionTo:(UIView *) view slideDirection:(int) style
{
	[current_view resignFirstResponder];
	prev_view = current_view;
	current_view = view;
	[transition transition:style toView:view];
	[view becomeFirstResponder];
}

+(id) initSharedInstanceWithFrame:(CGRect) win
{
	sharedInstanceViewControl = [[ViewController alloc] initWithFrame:win];
	return sharedInstanceViewControl;
}

-(CGRect) getFrame
{
	return frame;
}

+(id) sharedInstance
{
	return sharedInstanceViewControl;
}

- (void)mouseDown:(struct __GSEvent *)fp8
{
	NSLog(@"BING");
}

@end
